﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmViewPostCrawlers.aspx.cs" Inherits="WapCrawler.PostCrawler.frmViewPostCrawlers" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/PostCrawler/ucControls/ucPostCrawlerGridView.ascx" TagName="ucPostCrawlerGridView" TagPrefix="UserControl" %>



<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="../Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $(".content").hide();
        $(".show_hide").show();
        $(".show_hide").click(function () {
            $(".content").slideToggle();
        });
    }
);

</script>    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <a href="#" class="show_hide">Show/hide Content</a>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    
    <div id="div1" style="padding: 5px;">
                  <table style="width:40%;">
                    <tr>
                        <td>
                <asp:Label ID="Label3" runat="server" Text="Select Wap"></asp:Label>
                        </td>
                        <td>
                <asp:DropDownList ID="WapCrawlerDropDownList" runat="server" Width="200px" 
                    Style="height: 22px" DataSourceID="WapCrawlerLinqDataSource" 
                    DataTextField="wapSiteUrl" DataValueField="wapCrawlerId" 
                    AutoPostBack="True" 
                                onselectedindexchanged="WapCrawlerDropDownList_SelectedIndexChanged" 
                                ondatabound="WapCrawlerDropDownList_DataBound">
                </asp:DropDownList>
                <asp:LinqDataSource ID="WapCrawlerLinqDataSource" runat="server" 
                    ContextTypeName="WapCrawlerLib.WapDataClassesDataContext" EntityTypeName="" 
                    TableName="WapCrawlers">
                </asp:LinqDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td>
                <asp:Label ID="Label4" runat="server" Text="Select Topic"></asp:Label>
                        </td>
                        <td>
                <asp:DropDownList ID="TopicCrawlerDropDownList" runat="server" Width="200px" 
                    Style="height: 22px" DataSourceID="TopicCrawlerLinqDataSource" 
                    DataTextField="topicName" DataValueField="topicCrawlerId" AutoPostBack="True" 
                                onselectedindexchanged="TopicCrawlerDropDownList_SelectedIndexChanged" 
                                ondatabound="TopicCrawlerDropDownList_DataBound">
                </asp:DropDownList>
                <asp:LinqDataSource ID="TopicCrawlerLinqDataSource" runat="server" 
                    ContextTypeName="WapCrawlerLib.WapDataClassesDataContext" EntityTypeName="" 
                    TableName="TopicCrawlers" Where="wapCrawlerId == @wapCrawlerId">
                    <WhereParameters>
                        <asp:ControlParameter ControlID="WapCrawlerDropDownList" DefaultValue="-1" 
                            Name="wapCrawlerId" PropertyName="SelectedValue" Type="Int32" />
                    </WhereParameters>
                </asp:LinqDataSource>
                        </td>
                       
                    </tr>
                    
                </table>
                <br />
    </div>
    <div>
        <asp:Button ID="btnUpdatePost" runat="server" onclick="btnUpdatePost_Click" 
            Text="Update Selected Posts" />
        
        <asp:Button ID="btnAddMyPosts" runat="server" onclick="btnAddMyPosts_Click" 
            Text="Add My Posts" />
        
        <br />
    <asp:Label ID="Label12" runat="server" Text="Show forums per page"></asp:Label>
    <asp:DropDownList ID="dropDownListNumberOfRows" runat="server" AutoPostBack="True"
        OnSelectedIndexChanged="dropDownListNumberOfRows_SelectedIndexChanged">
        <asp:ListItem>10</asp:ListItem>
        <asp:ListItem>20</asp:ListItem>
        <asp:ListItem>50</asp:ListItem>
        <asp:ListItem>100</asp:ListItem>
        <asp:ListItem>All</asp:ListItem>
    </asp:DropDownList>
        
    </div>
    <div>
    <asp:PlaceHolder runat="server" ID="PostCrawlerGridViewPlaceHolder">
        <UserControl:ucPostCrawlerGridView id="UcPostCrawlerGridView" runat="server" />
    </asp:PlaceHolder>
    </div>
</asp:Content>
